/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.financial.entity.lettercredit;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.modules.base.entity.cars.Tcar;
import org.hibernate.validator.constraints.Length;

/**
 * 信用证Entity
 * @author Kilo
 * @version 2021-03-09
 */
@Table(name="t_letter_credit_detail", alias="a", columns={
		@Column(name="letter_credit_detail_id", attrName="letterCreditDetailId", label="信用证明细ID", isPK=true),
		@Column(name="car_id", attrName="carId", label="车辆"),
		@Column(name="brand", attrName="brand", label="品牌"),
		@Column(name="area", attrName="area", label="版型"),
		@Column(name="model", attrName="model", label="车型"),
		@Column(name="quantity", attrName="quantity", label="数量"),
		@Column(name="unit_price", attrName="unitPrice", label="单价"),
		@Column(name="amount", attrName="amount", label="车辆总价"),
		@Column(name="negotiated_amount", attrName="negotiatedAmount", label="押汇金额"),
		@Column(name="status1", attrName="status1", label="状态"),
		@Column(name="letter_credit_id", attrName="letterCreditId.letterCreditId", label="信用证ID"),
	}, joinTable={
		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= Tcar.class, attrName="tcar", alias="b",
				on="b.car_id = a.car_id", columns={
				@Column(name="car_id", label="车辆编码", isPK=true),
				@Column(name="car_name", label="车辆名称", isQuery=false),
		}),
	},orderBy="a.letter_credit_detail_id ASC"
)
public class LetterCreditDetail extends DataEntity<LetterCreditDetail> {
	
	private static final long serialVersionUID = 1L;
	private String letterCreditDetailId;		// 信用证明细ID
	private String carId;		// 车辆
	private String brand;		// 品牌
	private String area;		// 版型
	private String model;		// 车型
	private Long quantity;		// 数量
	private Double unitPrice;		// 单价
	private Double amount;		// 车辆总价
	private Double negotiatedAmount;		// 押汇金额
	private LetterCredit letterCreditId;		// 信用证ID 父类
	private String status1;
	private Tcar tcar;

	public Tcar getTcar() {
		return tcar;
	}

	public void setTcar(Tcar tcar) {
		this.tcar = tcar;
	}

	public String getStatus1() {
		return status1;
	}

	public void setStatus1(String status1) {
		this.status1 = status1;
	}

	public LetterCreditDetail() {
		this(null);
	}


	public LetterCreditDetail(LetterCredit letterCreditId){
		this.letterCreditId = letterCreditId;
	}
	
	public String getLetterCreditDetailId() {
		return letterCreditDetailId;
	}

	public void setLetterCreditDetailId(String letterCreditDetailId) {
		this.letterCreditDetailId = letterCreditDetailId;
	}
	
	@Length(min=0, max=64, message="车辆长度不能超过 64 个字符")
	public String getCarId() {
		return carId;
	}

	public void setCarId(String carId) {
		this.carId = carId;
	}
	
	@Length(min=0, max=2, message="品牌长度不能超过 2 个字符")
	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}
	
	@Length(min=0, max=64, message="版型长度不能超过 64 个字符")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}
	
	@Length(min=0, max=100, message="车型长度不能超过 100 个字符")
	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}
	
	public Long getQuantity() {
		return quantity;
	}

	public void setQuantity(Long quantity) {
		this.quantity = quantity;
	}
	
	public Double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}
	
	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}
	
	public Double getNegotiatedAmount() {
		return negotiatedAmount;
	}

	public void setNegotiatedAmount(Double negotiatedAmount) {
		this.negotiatedAmount = negotiatedAmount;
	}
	
	public LetterCredit getLetterCreditId() {
		return letterCreditId;
	}

	public void setLetterCreditId(LetterCredit letterCreditId) {
		this.letterCreditId = letterCreditId;
	}
	
}